home *** CD-ROM | disk | FTP | other *** search
- on unPuppetSprites first, last
- if (last < first) or (first <= 0) or (last >= 48) then
- return 0
- else
- repeat with i = first to last
- puppetSprite(i, 0)
- end repeat
- return 1
- end if
- end
-
- on deleteLastComma theLine
- if char length(theLine) of theLine = "," then
- delete char length(theLine) of theLine
- end if
- return theLine
- end
-
- on stripCR theString
- if char length(theString) of theString = RETURN then
- delete char length(theString) of theString
- end if
- return theString
- end
-
- on stripLeadingSpaces theLine
- set theLine to stripCR(theLine)
- set len to length(theLine)
- repeat with n = 1 to len
- if chars(theLine, n, n) <> " " then
- exit repeat
- end if
- end repeat
- return chars(theLine, n, len)
- end
-
- on copyList from
- set temp to []
- repeat with i = 1 to count(from)
- add(temp, getAt(from, i))
- end repeat
- return temp
- end
-
- on quoteIt theString
- if char 1 of theString = QUOTE then
- delete char 1 of theString
- end if
- if char length(theString) of theString = QUOTE then
- delete char length(theString) of theString
- end if
- repeat with i = 1 to length(theString)
- if char i of theString = QUOTE then
- put "'" into char i of theString
- end if
- end repeat
- set theString to QUOTE & theString & QUOTE
- return theString
- end
-
- on makeButtonClickSound
- puppetSound("MouseDwn.AIF")
- updateStage()
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- end
-
- on killSound
- if soundBusy(1) then
- puppetSound(0)
- end if
- end
-
- on debug theString
- if debugModeOn() then
- put theString
- end if
- end
-
- on debugModeOn
- global gDebugMode
- return gDebugMode
- end
-
- on setDebugMode theState
- global gDebugMode
- set gDebugMode to theState
- end
-
- on getX point
- return getAt(point, 1)
- end
-
- on getY point
- return getAt(point, 2)
- end
-
- on changeCursor theCursor
- if theCursor = EMPTY then
- cursor(200)
- updateStage()
- else
- cursor(-1)
- updateStage()
- end if
- end
-